<!-- Begin docs/files.tpl -->
<form method="post" action="?module=docs&action=view&sub=add_file&did={$did}" enctype="multipart/form-data">
{opentable}
{titlebar colspan=5 title=$lg->files}
<tr align="center" class="sectiontableheader">
<td align="left">{$lg->file_name}</td>
<td width="20%">{$lg->on}</td>
<td width="15%">{$lg->by}</td>
<td width="10%">{$lg->file_sizeKB}</td>
<td width="5%">{$lg->delete}</td>
</tr>
{if is_array($files)}
	{foreach from=$files item=file}
		<tr class="sectiontableentry1"  align="center">
		<td align="left"><img src="{ficon id=$file.fid}" border="0">  <a href="?module=files&action=download&fid={$file.fid}">{$file.summary}</a></td>
		<td>{$file.uploaded_on|userdtime}</td>
		<td>{username id=$file.userid}</td>
		<td align="right">{fsize id=$file.size}</td>	
		{if is_admin($smarty.session.userid)}
			<td width="5%"><a href="?module=files&action=delete&fid={$file.fid}&did={$did}"><img src="{$smarty.env.imgs.delete}" border="0" alt="Delete" /></a></td>
		{elseif $file.userid eq $smarty.session.userid and $file.uploaded_on > $tlimit }
			<td width="5%"><a href="?module=files&action=delete&fid={$file.fid}&did={$did}"><img src="{$smarty.env.imgs.delete}" border="0" alt="Delete" /></a></td>
		{else}
			<td width="5%">&nbsp;</td>
		{/if}
	{/foreach}
{else}
<tr class="sectiontableentry1" align="center"><td colspan="6">{$lg->no_data}</td></tr>
{/if}
{if $smarty.get.sub eq "add_file"}
<tr class="sectiontableentry1" align="left">
	<td colspan="6"><input type="file" size="20" id="upload" name="upload">
	<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
	<input type="submit" name="add_file" class="button" value={$lg->add} /></td>
</tr>
{/if}
</table>
</form>
<!-- End docs/files.tpl -->

